using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace RomanJendrusz.Amazon.ETL.Infrastructure.DataBase
{
    public class DataBaseConnectionFactory: IDataBaseConnectionFactory
    {
        private readonly string connectionString;

        public DataBaseConnectionFactory(string connectionString)
        {
            this.connectionString = connectionString;
        }

        public DataBaseConnectionFactory(ConnectionStringSettings settings)
        {
            connectionString = settings.ConnectionString;
        }


        public IDbConnection DBConnection
        {
            get { return new SqlConnection(connectionString); }
        }
    }
}